<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>

    <input type="text">
    <script>

        // 正则表达式 ：做字符串校验   regular expression  


        // 正则的创建方法1
        var reg = /good/;
        console.log(reg);


        // 正则的创建方法2
        var reg2 = new RegExp('good');
        console.log(reg2);


    </script>

</body>

</html>